<?php
/**
* DPMatchReserve copyright (c) 2008 sk89q
* @ http://digitalpaint.therisenrealm.com
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*/

require_once "./functions.php";

$smarty->assign('title', 'Lease a Match Server');

// ===============================
// Generate list of servers
// ===============================

$servers = array();

foreach($CONFIG['servers'] as $i => $server)
{
    $servers[$i] = array('name' => $server['name'],
                         'host' => $server['host'],
                         'port' => $server['port']);
}

$smarty->assign('servers', $servers);

// ===============================
// Get user-configurable cvars
// ===============================

$smarty->assign('enable_autoselect', $CONFIG['enable_autoselect']);
$smarty->assign('default_settings', $CONFIG['default_settings']);
$smarty->assign('user_settings', $CONFIG['user_settings']);
$smarty->assign('bot_check_string', $CONFIG['bot_check_string']);

// ===============================
// Send it off
// ===============================

$smarty->assign('form_action', 'lease.php');

$smarty->display('index.tpl');
?>